﻿// ---------------------------------------------------------------------
// Partial của lớp SSupervisor
//
// Nội dung:
//    + Các hàm gửi message trong lượt Main phase 1
//
// Copyright (c) 2009 YugiOH
//
// Nguyễn Hữu Lê Trọng Tín      YM: ilu2009             ĐT: 0906520611 
// Võ Phước Hậu                 YM: phuochauspkt        ĐT: 0979202707
// ---------------------------------------------------------------------



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common;

namespace ServerYuGi
{
    public partial class SSupervisor
    {
        /// <summary>
        /// Gửi message đến tất cả player báo main phase 1 bắt đầu
        /// </summary>
        /// <param name="IDPlayer">ID player trong lượt</param>        
        public void SendMessage_TURN_MAINPHASE1_BEGIN_ToAll(int IDPlayer)
        {
            //ServerSocket.SendMessageToEveryOne(YMSG.TURN_MAINPHASE1_BEGIN, IDPlayer);
            Table.SendMessageAll(YMSG.TURN_MAINPHASE1_BEGIN, IDPlayer);
        }

        /// <summary>
        /// Gửi message đến tất cả player báo main phase 1 kết thúc
        /// </summary>
        /// <param name="IDPlayer">ID player trong lượt</param>
        public void SendMessage_TURN_MAINPHASE1_END_ToAll(int IDPlayer)
        {
            //ServerSocket.SendMessageToEveryOne(YMSG.TURN_MAINPHASE1_END, IDPlayer);
            Table.SendMessageAll(YMSG.TURN_MAINPHASE1_END, IDPlayer);
        }

        /// <summary>
        /// Gửi message đến 1 player báo đổi trạng thái 1 lá bài xong 
        /// </summary>
        /// <param name="IDPlayer">ID player sẽ gửi</param>
        /// <param name="IDCard">ID lá bài đổi trạng thái</param>
        /// <param name="TrangThai">Trạng Thái mới</param>
        public void SendMessage_CARD_DOITRANGTHAI_XONG_ToID(int IDPlayer, int IDCard, YMSG TrangThai)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_DOITRANGTHAI_XONG, IDCard, TrangThai);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_DOITRANGTHAI_XONG, IDCard, TrangThai);
        }

        /// <summary>
        /// Gửi message đến tất cả player báo đổi trạng thái 1 lá bài xong 
        /// </summary>
        /// <param name="IDCard">ID lá bài đổi trạng thái</param>
        /// <param name="TrangThai">Trạng Thái mới</param>
        public void SendMessage_CARD_DOITRANGTHAI_XONG_ToAll(int IDCard, YMSG TrangThai)
        {
            //ServerSocket.SendMessageToEveryOne(YMSG.CARD_DOITRANGTHAI_XONG, IDCard, TrangThai);
            Table.SendMessageAll(YMSG.CARD_DOITRANGTHAI_XONG, IDCard, TrangThai);
        }

        /// <summary>
        /// Gửi message đến 1 player báo lên bài không hợp lệ
        /// </summary>
        /// <param name="IDPlayer">ID player sẽ gửi</param>
        public void SendMessage_CARD_LENBAI_KHONGHOPLE_ToID(int IDPlayer)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_KHONGHOPLE);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_KHONGHOPLE);
        }

        /// <summary>
        /// Gửi message đến 1 player báo có thể lên bài
        /// </summary>
        /// <param name="IDPlayer">ID player sẽ gửi</param>
        public void SendMessage_CARD_LENBAI_ToID(int IDPlayer)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI);
        }

        /// <summary>
        /// Gửi message đến 1 player báo lên bài hợp lệ
        /// </summary>
        /// <param name="IDPlayer">ID player sẽ gửi</param>
        /// <param name="ID">ID lá bài</param>
        /// <param name="TrangThai">Trạng thái lá bài lúc đã lên bàn</param>
        public void SendMessage_CARD_LENBAI_HOPLE_ToID(int IDPlayer, int ID, YMSG TrangThai)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_HOPLE, ID, TrangThai);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_HOPLE, ID, TrangThai);
        }

        /// <summary>
        /// Gửi message đến 1 player báo lên bài xong
        /// </summary>
        /// <param name="IDPlayer">ID player sẽ gửi</param>
        /// <param name="data">dữ liệu gửi</param>
        public void SendMessage_CARD_LENBAI_XONG_ToID(int IDPlayer, object[] data)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_XONG, data);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_XONG, data);
        }

        /// <summary>
        /// Gửi message đến 1 player báo lên bài quái vật đặc biệt hợp lệ
        /// </summary>
        /// <param name="IDPlayer">ID player sẽ gửi</param>
        /// <param name="data">dữ liệu gửi</param>
        public void SendMessage_CARD_LENBAI_SUMMONDACBIET_HOPLE_ToID(int IDPlayer, object[] data)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_SUMMONDACBIET_HOPLE, data);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_SUMMONDACBIET_HOPLE, data);
        }

        /// <summary>
        /// Gửi message đến 1 player báo lên bài quái vật đặc biệt xong
        /// </summary>
        /// <param name="IDPlayer">ID player sẽ gửi</param>
        /// <param name="data">dữ liệu gửi</param>
        public void SendMessage_CARD_LENBAI_SUMMONDACBIET_XONG_ToID(int IDPlayer, object[] data)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_SUMMONDACBIET_XONG, data);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_SUMMONDACBIET_XONG, data);
        }

        public void SendMessage_CARD_LENBAI_SUMMONDACBIET_XONG_ToID(int IDPlayer, byte[] data)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_SUMMONDACBIET_XONG, data);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_SUMMONDACBIET_XONG, data);
        }

        /// <summary>
        /// Gửi message đến 1 player báo lên bài ma thuật không hợp lệ
        /// </summary>
        /// <param name="IDPlayer">ID player sẽ gửi</param>


        public void SendMessage_CARD_XOABAI_DOITHU_TAY_ToID(int IDPlayer, int vitri)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_XOABAI_DOITHU_TAY, vitri);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_XOABAI_DOITHU_TAY, vitri);
        }


        public void SendMessage_CARD_LENBAI_SPELL_KHONGHOPLE_ToID(int IDPlayer)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_SPELL_KHONGHOPLE);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_SPELL_KHONGHOPLE);
        }

        public void SendMessage_CARD_LENBAI_SPELL_HOPLE_ToID(int IDPlayer, int ID, YMSG TrangThai)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_SPELL_HOPLE,ID,TrangThai);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_SPELL_HOPLE, ID, TrangThai);
        }

        public void SendMessage_CARD_LENBAI_SPELL_XONG_ToID(int IDPlayer, object[] data)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_SPELL_XONG,data);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_SPELL_XONG, data);
        }

        public void SendMessage_CARD_LENBAI_TRAP_HOPLE_ToID(int IDPlayer, int ID, YMSG TrangThai)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_TRAP_HOPLE, ID, TrangThai);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_TRAP_HOPLE, ID, TrangThai);
        }

        public void SendMessage_CARD_LENBAI_TRAP_KHONGHOPLE_ToID(int IDPlayer)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_TRAP_KHONGHOPLE);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_TRAP_KHONGHOPLE);
        }

        public void SendMessage_CARD_LENBAI_TRAP_XONG_ToID(int IDPlayer, object[] data)
        {
            //ServerSocket.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_TRAP_XONG, data);
            Table.SendMessageToID(IDPlayer, YMSG.CARD_LENBAI_TRAP_XONG, data);
        }
    }
}
